<script setup lang="ts">
import {ref} from 'vue';
import {useRoute} from 'vue-router';
import Article from "~/api/Article";
const article = new Article()


const route = useRoute()
const id = ref(route.params.id);
const pageSize = 10;
let detail = await article.getDetail(id.value)
const title = stripHtml(detail.content, 30, false) + " - 小熊文案馆";

useSeoMeta({
  title: title,
});
let random = await article.list(1, pageSize, null, true)
</script>

<template>
  <div class="page">
    <ContentDetail :article="detail"/>
    <UDivider class="py-4" label="相似推荐"/>
    <div>
      <div v-if="random.list">
        <div v-for="article in random.list" :key="article._id">
          <Content :article="article"/>
        </div>
      </div>
    </div>
  </div>
</template>

<style lang="scss" scoped>
.test {
}
</style>
